home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr35 / rnet200f.zip / RNETPACK.DOC < prev    next >
Text File  |  1993-06-02  |  13KB  |  210 lines

  1. -------------------------------------------------------------------------------
  2.                               Using RNETPACK.LST
  3. -------------------------------------------------------------------------------
  4.  
  5.   Here's the problem:  We all need to pack our messagebases fairly heavily due
  6.   to the message traffic in echo conferences.  However, packing ALL of your
  7.   messagebases all of the time it not only time consuming, it also causes more
  8.   wear and tear on your drives than needed.
  9.  
  10.   Here's the solution:  RNET can check your conferences (any or all) and
  11.   determine when they reach a specified message count.  When they reach that
  12.   level, you can then pack the messagebase to a lower count.  The result is
  13.   that your messagebases are packed less often, and only when *needed*.
  14.  
  15.   When you've got everything setup, RNET creates a batch file that calls the
  16.   packing program of your choice with the params of your choice.  All you
  17.   need to do is call the resulting batch file to pack conferences that need
  18.   packing (it does not pack conferences that have not made it to the message
  19.   limit specified).  If the batch file does not exist, there are no
  20.   conferences that need packing.  It's that simple.
  21.  
  22.                             Creating RNETPACK.LST
  23.  
  24.   Using the text editor of your choice, create RNETPACK.LST with the following
  25.   information:
  26.  
  27.      <conf#>  <max messages>  <packing cmd>
  28.  
  29.      <conf#>          = a conference number or range of numbers.
  30.      <max messages>   = max messages allowed before packing required.
  31.      <packing cmd>    = commandline to write to batch to do the packing.
  32.  
  33.    Example RNETPACK.LST file:
  34. ┌─────────────────────────────────────────────────────────────────────────────┐
  35. │ 0       750  pcbpack /AREA:@CONFNUM@ /MA:500 /MM:200 /NC /FA /KB /KD /QUIET │
  36. │ 1-249   750  pcbpack /AREA:@CONFNUM@ /MA:500 /MM:50  /NC /FA /KB /KD /QUIET │
  37. │ 250-500 500  pcbpack /AREA:@CONFNUM@ /MA:250 /MM:50  /NC /FA /KB /KD /QUIET │
  38. └─────────────────────────────────────────────────────────────────────────────┘
  39.  
  40.   Conference 0 (main board) is packed only when it has more than 750 messages
  41.   and it will be packed down to 500 messages (min of 200).
  42.  
  43.   Conferences 1 to 249 are only packed when they exceed 750 messages and are
  44.   packed down to 500 messages (min of 50 kept).
  45.  
  46.   Conferences 250 to 500 are packed when they have more than 500 messages and
  47.   are packed down to a max of 250 (min of 50).
  48.  
  49.   The packing will actually be done by PCBPACK.EXE (please see the PCBoard
  50.   documentation for operation of PCBPACK.EXE).  You could "call pack.bat" or
  51.   do anything else you wanted.  Whatever is specified for the packing command
  52.   is written to RNETPACK.BAT.
  53.  
  54.   Note the "@CONFNUM@" included in the packing line.  @CONFNUM@ will be
  55.   replaced with the conference number that needs to be packed.  You may also
  56.   use @CONFNAME@ (name of the conference, like "Main Board") and @MSGFILE@
  57.   (full path name of the messages file, such as "D:\CONF\MSGS") or any
  58.   environment variables or other RNET @..@ codes.
  59.  
  60.   NOTE: If any conferences need to be packed (ie, if RNETPACK.BAT is created),
  61.   RNET will always put the following at the beginning of the file:
  62.   ┌─────────────────────────────────────┐
  63.   │ @echo off                           │
  64.   │ echo ** Auto-pack batch created...  │
  65.   │ %PCBDRIVE%                          │
  66.   │ CD %PCBDIR%                         │
  67.   │ (packing lines go here...)          │
  68.   └─────────────────────────────────────┘
  69.   The %PCBDRIVE% and CD %PCBDIR% is done since PCBPACK.EXE requires you to be
  70.   in the PCB directory to operate correctly.
  71.  
  72.   You can have the batch file do whatever you want... for testing purposes,
  73.   you could use a RNETPACK.LST file to just do echo statements as:
  74. ┌─────────────────────────────────────────────────────────────────────────────┐
  75. │ 0       750  echo Conference @CONFNAME@ (@CONFNUM@) has over 750 msgs!      │
  76. │ 20-50   500  echo Conference @CONFNAME@ (@CONFNUM@) has over 500 msgs!      │
  77. │ 300-302 100  echo Conference @CONFNAME@ (@CONFNUM@) has over 100 msgs!      │
  78. └─────────────────────────────────────────────────────────────────────────────┘
  79.    This might result in RNETPACK.BAT:
  80. ┌─────────────────────────────────────────────────────────────────────────────┐
  81. │@echo off                                                                    │
  82. │echo ** Auto-pack batch created by RNET Thu May 20 1993                      │
  83. │C:                                                                           │
  84. │CD \PCB                                                                      │
  85. │echo Conference Main Board (0) has over 750 msgs!                            │
  86. │echo Conference AtlSysop (21) has over 500 msgs!                             │
  87. │echo Conference Usenet_bad (47) has over 500 msgs!                           │
  88. │echo Conference sci.astro (300) has over 100 msgs!                           │
  89. │echo Conference sci.astro.hst (301) has over 100 msgs!                       │
  90. │echo Conference sci.astro.fit (302) has over 100 msgs!                       │
  91. └─────────────────────────────────────────────────────────────────────────────┘
  92.  
  93.    You can even do something sneaky like build a cheap CNFN screen using:
  94. ┌─────────────────────────────────────────────────────────────────────────────┐
  95. │ 0-25    0 echo @CONFNUM@ @POS:10@ @CONFNAME@ @POS:30@(local)    >>C:\JUNK   │
  96. │ 100-149 0 echo @CONFNUM@ @POS:10@ @CONFNAME@ @POS:30@(ILink)    >>C:\JUNK   │
  97. │ 150-199 0 echo @CONFNUM@ @POS:10@ @CONFNAME@ @POS:30@(SmartNet) >>C:\JUNK   │
  98. │ 200-249 0 echo @CONFNUM@ @POS:10@ @CONFNAME@ @POS:30@(RIME)     >>C:\JUNK   │
  99. │ 250-500 0 echo @CONFNUM@ @POS:10@ @CONFNAME@ @POS:30@(Usenet)   >>C:\JUNK   │
  100. │; all conferences are listed that have any messages at all (ie, over 0)      │
  101. │; @X color codes could be added as well...                                   │
  102. └─────────────────────────────────────────────────────────────────────────────┘
  103.    This might result in RNETPACK.BAT:
  104. ┌─────────────────────────────────────────────────────────────────────────────┐
  105. │@echo off                                                                    │
  106. │echo ** Auto-pack batch created by RNET Thu May 20 1993                      │
  107. │C:                                                                           │
  108. │CD \PCB                                                                      │
  109. │echo 0 @POS:10@ Main Board @POS:30@(local)    >>C:\JUNK                      │
  110. │echo 1 @POS:10@ ChitChat @POS:30@(local)    >>C:\JUNK                        │
  111. │echo 2 @POS:10@ NASA @POS:30@(local)    >>C:\JUNK                            │
  112. │...                                                                          │
  113. │echo 300 @POS:10@ sci.astro @POS:30@(Usenet)    >>C:\JUNK                    │
  114. └─────────────────────────────────────────────────────────────────────────────┘
  115.  
  116.   Note that the @POS:xx@ is a PCBoard 15 feature.  Now, if you run the above
  117.   batch (making sure to delete C:\JUNK if it already exists), a quick and
  118.   dirty CNFN screen can be created.  This example doesn't actually pack any
  119.   message bases, it's just an example of the kinds of things you can do.
  120.  
  121.   RNET can create the RNETPACK.BAT file automatically -or- you can tell it
  122.   when to create it via the commandline.  To have RNET create it
  123.   automatically, add a AUTO_PACK=YES to your .CFG.  Then, after RNET is done
  124.   with everything else during an IMPORT, it will check the conferences as
  125.   instructed in the RNETPACK.LST file, building the RNETPACK.BAT as needed.
  126.  
  127.   Note: RNET doesn't actually run the batch file... it just creates it.
  128.  
  129.   If you want to TELL RNET when to create the batch, use AUTO_PACK=NO
  130.   (which is the default) and run RNET PACK <hostid.cfg> when you want
  131.   it to do the checking (ie, use "PACK" in place of IMPORT or EXPORT).
  132.  
  133.   Example EVENT batch file for doing several mail events and then checking
  134.   for packing:
  135.   ┌──────────────────────────────────────────────────────────────────────┐
  136.   │ @echo off                                                            │
  137.   │ echo ** RNET EVENT **                                                │
  138.   │ D:                                                                   │
  139.   │ cd \RNET                                                             │
  140.   │                                                                      │
  141.   │ rem Export new messages for three hosts we call                      │
  142.   │ RNET EXPORT ARGOSY                                                   │
  143.   │ RNET EXPORT ADBUS                                                    │
  144.   │ RNET EXPORT TRP                                                      │
  145.   │                                                                      │
  146.   │ rem Call hosts and upload REPs, download QWKs                        │
  147.   │ TELIX -sARGOSY                                                       │
  148.   │ TELIX -sADBUS                                                        │
  149.   │ TELIX -sTRP                                                          │
  150.   │                                                                      │
  151.   │ rem Import new QWK packets if they exist                             │
  152.   │ RNET IMPORT ARGOSY                                                   │
  153.   │ RNET IMPORT ADBUS                                                    │
  154.   │ RNET IMPORT TRP                                                      │
  155.   │                                                                      │
  156.   │ rem Check for messagebases that need packing (any <hostid> will do)  │
  157.   │ RNET PACK TRP                                                        │
  158.   │                                                                      │
  159.   │ rem Do actual messagebase packing by calling auto-pack batch file    │
  160.   │ if exist d:\rnet\RNETPACK.BAT call d:\rnet\RNETPACK.BAT              │
  161.   │                                                                      │
  162.   │ rem Delete auto-pack batch file                                      │
  163.   │ if exist d:\rnet\RNETPACK.BAT del d:\rnet\RNETPACK.BAT               │
  164.   │                                                                      │
  165.   │ rem Restart BBS (end of event)                                       │
  166.   │ BOARD.BAT                                                            │
  167.   └──────────────────────────────────────────────────────────────────────┘
  168.  
  169.   I personally have AUTO_PACK=NO and have a specific batch file that is called
  170.   to do my packing during the 4am event via:  " CALL K:\RNET\PACK.BAT " which
  171.   has:
  172.   ┌─────────────────────────────────────────────────┐
  173.   │ @echo off                                       │
  174.   │ k:                                              │
  175.   │ cd \rnet                                        │
  176.   │ RNET PACK TRP.CFG                               │
  177.   │ if exist RNETPACK.BAT RNETPACK                  │
  178.   └─────────────────────────────────────────────────┘
  179.  
  180.   Since I used a "call k:\rnet\pack.bat" in my 4AM batch, when either
  181.   K:\RNET\PACK.BAT ends (ie, nothing to pack) or K:\RNET\RNETPACK.BAT ends
  182.   (after packing), control is returned to the calling batch (EVENT.BAT).
  183.  
  184. -------------------------------------------------------------------------------
  185.                               Advanced Operation
  186. -------------------------------------------------------------------------------
  187.  
  188.   When you've got all that figured out, guess what?  Not only can you change
  189.   the name of the RNETPACK.LST and RNETPACK.BAT filenames, you can use
  190.   different names to have it do different things on different days!  You might
  191.   want to only check conferences on MON, WED, FRI...  To do so, simply add
  192.   PACK_LIST=@WEEKDAY@.LST and create a MON.LST, WED.LST, and FRI.LST files. If
  193.   it's Tuesday, RNET will look for TUE.LST -- it doesn't do anything if it
  194.   doesn't find it.  If you use an environment variable to give RNET a "home"
  195.   other than the current directory (ie, you use QWIKMAIL= or RNET=), and want
  196.   your weekday.lst file to be stored there, use PACK_LIST=@HOME@@WEEKDAY@.LST
  197.  
  198.   The RNETPACK.BAT filename can also be overridden with PACK_BAT=<filename>.
  199.  
  200.   If you want a different packing .LST for each host you call, use the
  201.   following in each <hostid>.CFG file:
  202.  
  203.      PACK_LIST=@HOME@@HOSTID@.LST  ; use <hostid>.lst for packing rules
  204.      PACK_BAT =@HOME@@HOSTID@.BAT  ; create <hostid>.bat to do actual packing
  205.  
  206.   The default for PACK_LIST= is @HOME@RNETPACK.LST and the default for
  207.   PACK_BAT= is @HOME@RNETPACK.BAT.  AUTO_PACK defaults to OFF.
  208.  
  209. -------------------------------------------------------------------------------
  210.